Developer Documentation

QuickTime 4 API Documentation

3D Graphics Programming with QuickDraw 3D 1.5.4

Previous | QD3D Book | Overview | Chapter Contents | Next |

Containers

Labels

ASCII
Container
Binary
cntr ( = 0x636E7472 )

Data Format

No data.

Data Size

8k + S, where k is the number of elements in the container and S is the sum of the sizes of those elements. (For each of the k elements, 4 bytes for the type ID and 4 bytes for the field that holds the element's size, plus the size of the element.)

Description

A container is an ordered collection of objects. Containers are used to form complex objects from simpler objects in ways permitted by the structure of the metafile object hierarchy. In particular, child objects (also called subobjects ) are attached to parent objects (also called the root ) through the use of containers. The first object in a container is the parent (or root) object. Every container must contain at least one object. Containers may be nested. An object may be instantiated more than once in a hierarchy of nested containers.

The notation for containers in text metafiles is as follows:

    Container (
        object0
        .
        .
        .
        objectnobjects-1
    )

Notations for contained objects are separated by blank spaces rather than by punctuation marks, as is the case in the notation for other objects having nonzero size.

The root object of a container must be a shared object, may not be a container itself, and may not be the target object of a file pointer. The position in the metafile object hierarchy of the root object of a container constrains the number, type, and in some cases the order of occurrence of other elements of that container. Each element of a container other than the root object must be either a legitimate child object of the root object or another container. In the latter case, the root object of the inner container must be a legitimate child object of the root object of the outer one.

A container may be the target object of a file pointer.

Parent Hierarchy

3DMF.

Parent Objects

None.

Child Objects

None.

Example

3DMetafile ( 1 5 Normal tableofcontents0> )
    box2:
    Container (
        Box (
            0 0 1                       # orientation
            1 0 0                       # majorAxis
            0 0 0                       # minorAxis
            0 1 0                       # origin
        )
        attributeset3:
        Container (
            AttributeSet ( )
            DiffuseColor ( 0.9 0.9 0.2 )
        )
    )
 

Offset

Hexadecimal code

ASCII

0000

3344 4D46 2020 2010 2001 2005 2020 2020

3DMF············

0010

2020 2020 2020 2020 636E 7472 2020 205C

········cntr···\

0020

626F 7820 2020 2030 2020 2020 2020 2020

box····0········

0030

3F80 2020 3F80 2020 2020 2020 2020 2020

?···?···········

0040

2020 2020 2020 2020 2020 2020 2020 2020

················

0050

3F80 2020 2020 2020 636E 7472 2020 201C

?·······cntr····

0060

6174 7472 2020 2020 6B64 6966 2020 200C

attr····kdif····

0070

3F66 6666 3F66 6666 3E4C CCCD

?fff?fff>L··


© 1997 Apple Computer, Inc.

Previous | QD3D Book | Overview | Chapter Contents | Next |